<?php
namespace app\common\model\app;


use app\common\model\TimeModel;

class App extends TimeModel
{
    protected $deleteTime = 'delete_time';

    public static function onAfterInsert($data){
        $StoreUser = app('app\common\model\system\SystemAdmin');

        //新增项目超级用户
        $StoreUser->save(['nickname'=>'超级管理员','auth_ids'=>$data['auth'],
            'username'=>$data['username'],'password'=>password($data['password']),'app_id'=>$data->id,'is_app'=>1
        ]);
    }

}